Icon view must layout before the draw handler is called
authorKristian Rietveld <kris@gtk.org>
Sun, 17 Oct 2010 08:27:41 +0000 (10:27 +0200)
committerKristian Rietveld <kris@gtk.org>
Sun, 17 Oct 2010 08:30:46 +0000 (10:30 +0200)
commitcc22469b6908e9e12ba77b02474aadd59bcaa990
treeba0e47dd3c33629731f32c38a8891a0060ef33a2
parentf27d7bdea5d6cb5d45fdb83271360ff511e2be94
Icon view must layout before the draw handler is called

gtk_icon_view_layout(), which can resize the bin window and thus
underlying surfaces, could be called from gtk_icon_view_draw().  So
we have to make sure that layouting is done before the draw handler is
called.  We use the same construction as in tree view here, the layout
idle handler is installed with a higher priority than
GDK_PRIORITY_REDRAW and we wrap the call to gdk_window_process_updates()
in a new function that will flush the layout queue beforehand.
gtk/gtkiconview.c